Skip to content

fix: make compatible with v5 and v7#928

Open
vaeng wants to merge 1 commit intomainfrom
fix-powershell
Open

fix: make compatible with v5 and v7#928
vaeng wants to merge 1 commit intomainfrom
fix-powershell

Conversation

@vaeng
Copy link
Copy Markdown
Contributor

@vaeng vaeng commented Apr 9, 2026

I had problems using the existing script with windows 11 and powershell 5. I updated my ps version to 7.6 and still had errors.

As I don't know powershell, I used AI to finda solution and this seems to work. I am worried about backwards comatibility and general AI use for things I don't understand.

Probably best to let knowledgeable people judge this.

@vaeng vaeng requested a review from ErikSchierboom as a code owner April 9, 2026 07:21
@ErikSchierboom
Copy link
Copy Markdown
Member

I'm not really that knowledgeable about PowerShell. Maybe @exercism/powershell could take a look?

@ErikSchierboom
Copy link
Copy Markdown
Member

I updated my ps version to 7.6 and still had errors.

That's weird. What was the error?

Comment on lines +54 to +59
if (Get-Command Expand-Archive -ErrorAction SilentlyContinue) {
Expand-Archive -Path $outputPath -DestinationPath $outputDirectory -Force
} else {
Add-Type -AssemblyName System.IO.Compression.FileSystem
[System.IO.Compression.ZipFile]::ExtractToDirectory($outputPath, $outputDirectory)
}
Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This looks like it silently fails when Expand-Archive cannot be found, in which case configlet cannot be extracted. I don't think that's what we want?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants